package com.zecan.rabbitmq.rabbitmq.service;

import com.zecan.rabbitmq.rabbitmq.config.ConfirmConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * \* Created with IntelliJ IDEA.
 * \* User: lenovo
 * \* Date: 2022/4/21
 * \* Time: 8:53
 * \* Description:
 * \
 */
@Slf4j
@Component
public class ConfirmConsumer {
    private static final String CONFIRM_QUEUE_NAME = "confirm.queue";


    @RabbitListener(queues = CONFIRM_QUEUE_NAME)
    public void receiveMsg(Message message) {
        log.info("队列输出消息为{}",new String(message.getBody()));
    }

}
